import org.apache.spark.{SparkConf, SparkContext}

/**
 * 作者: LDL
 * 功能说明:
 * 创建日期: 2015/8/14 15:40
 */
object SimpleApp {

    def main(args: Array[String]) {
        val logFile = "F:\\tools\\spark-1.4.1\\README.md"
        val conf = new SparkConf().setMaster("local").setAppName("hello")
        val sc = new SparkContext(conf)
        val logData = sc.textFile(logFile,2).cache()
        val dataFile = logData.map(s=>s.length)
        dataFile.saveAsObjectFile("D:\\tt.text")
        println()

    }
}
